<include file="Core:Public:header" />
{:W('Navigation')}
<script src="__PUBLIC__/js/datepicker/WdatePicker.js"></script>
<div class="body-right">
	<div class="row-table">
		<div class="row-table-title">员工配备</div>
		<div class="row-table-body">
			
				<div class="panel panel-default">
				  <div class="panel-heading">
				员工配备&nbsp;&nbsp;
				<a href="{:U('hrm/peibei/add')}" class="pull-right btn btn-primary btn-xs" >添加</a>
				<div class="clear"></div>
				<div class="col-md-12">
					<label class="col-md-3">部门选择：
						<select id="dids" class="form-control">
							<volist name="dlist" id="vo">
								<option value="{$vo.department_id}">{$vo.name}</option>
							</volist>
						</select>
					</label>
					<div class="col-md-1"><a href="javascript:;" onclick="dsup()" class="btn btn-primary">查找</a></div>
					<div class="clear"></div>
				</div>
			</p></div>
				  <div class="panel-body">
					<if condition="empty($glist)">
						<div>---暂无数据---</div>
					<else />
						<table class="table table-hover table-striped" >
							<tbody>
								<tr>
									<th>员工名称</th>
									<th>配备情况</th>
									<th>更新时间</th>
									<th>操作</th>
								</tr>
								<volist name="glist" id="vo">
								<tr>
									<td><a href="{:U('hrm/peibei/view','uid='.$vo['user_id'])}">{$vo.uname}</a></td>
									<td>
										<if condition="$vo['peibei']">{$vo.peibei}<else />未分配</if></td>
									<td>
										<if condition="$vo['update']">
											{$vo.update|date='Y-m-d H:i:s',###}
										<else />
											{$vo.creattime|date='Y-m-d H:i:s',###}
										</if>
										
									</td>
									<td>
										<a href="{:U('hrm/peibei/edit','id='.$vo['pid'])}">编辑</a>&nbsp;|&nbsp;
										<a href="{:U('hrm/peibei/del','id='.$vo['pid'])}">删除</a>
									</td>
								</tr>
								</volist>
							</tbody>
							<tfoot>
							<tr>
									<td colspan="10" align="center">{$page}<div class="clear"></div></td>
								</tr>
							</tfoot>
						</table>
					</if>
				</div>
			</div>
		</div>
	</div>
</div>
<script>
function dsup(){
	var did=$('#dids').val();
	window.location.href = "{:U('hrm/peibei/li')}&did=" + did;
}
</script>
<div class="clear"></div>
<include file="Core:Public:alert" />
<include file="Core:Public:footer" />